// 创建action
import { ADD, MINUS, CHANGE_TEXT, ADD_TO_DO, CHANGE_CHECK, DEL_TASK } from './constans'

export function addAction(payload) {
  return { type: ADD, payload };
}

export function minusAction(payload) {
  return { type: MINUS, payload }
}

// 以下是todolist里的action

export function changeTextAction(payload) {
  return { type: CHANGE_TEXT, payload }
}

export function AddToDoAction(payload) {
  return { type: ADD_TO_DO, payload }
}

export function changeCheckAction(payload) {
  return { type: CHANGE_CHECK, payload }
}

export function deltaskAction(payload) {
  return { type: DEL_TASK, payload }
}